﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:converters="clr-namespace:Tfs.OnTheRoad.Converters"
    xmlns:system="clr-namespace:System;assembly=mscorlib">
    <!--Button Style with AccentBrush, to be used on the few existing buttons of this App-->
	<Style TargetType="Button" x:Key="ButtonStyle">
    	<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
    	<Setter Property="Background" Value="{StaticResource PhoneAccentBrush}" />
    </Style>
    
    <Style TargetType="Grid" x:Key="GridAccentStyle">
        <Setter Property="Background" Value="{StaticResource PhoneAccentBrush}" />
    </Style>
    
    <Style TargetType="TextBlock" x:Key="AccentTextBlock">
    	<Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"/>
    </Style>
    <Style TargetType="TextBlock" x:Key="ForegroundTextBlock">
        <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
    </Style>

    <Style x:Key="DetailsHeaderID"
        TargetType="TextBlock">
        <Setter Property="FontFamily"
            Value="{StaticResource PhoneFontFamilySemiLight}" />
        <Setter Property="FontSize"
            Value="36" />
        <Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"></Setter>
        <Setter Property="Margin"
            Value="{StaticResource PhoneHorizontalMargin}" />
    </Style>
    
    <Style x:Key="DetailsHeaderText"
        TargetType="TextBlock">
        <Setter Property="FontFamily"
            Value="{StaticResource PhoneFontFamilySemiLight}" />
        <Setter Property="FontSize"
            Value="34" />
        <Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"></Setter>
        <Setter Property="Margin"
            Value="{StaticResource PhoneHorizontalMargin}" />
    </Style>


    <Style x:Key="PhoneTextBlockBaseWithoudForeground"
        TargetType="TextBlock">
        <Setter Property="FontFamily"
            Value="{StaticResource PhoneFontFamilyNormal}" />
        <Setter Property="FontSize"
            Value="{StaticResource PhoneFontSizeNormal}" />
        <!--<Setter Property="Foreground"
 Value="{StaticResource PhoneForegroundBrush}" />-->
        <Setter Property="Margin"
            Value="{StaticResource PhoneHorizontalMargin}" />
    </Style>

    <Style x:Key="PhoneTextTitle3StyleWithoutForeground"
        TargetType="TextBlock">
        <Setter Property="FontFamily"
            Value="{StaticResource PhoneFontFamilySemiLight}" />
        <Setter Property="FontSize"
            Value="{StaticResource PhoneFontSizeMedium}" />
        <Setter Property="Margin"
            Value="{StaticResource PhoneHorizontalMargin}" />
        <!--<Setter Property="Foreground"
 Value="{StaticResource PhoneForegroundBrush}" />-->
    </Style>
    
    <Style x:Key="PhoneTextExtraLargeStyleWithoutForeground"
        BasedOn="{StaticResource PhoneTextBlockBaseWithoudForeground}"
        TargetType="TextBlock">
        <Setter Property="FontFamily"
            Value="{StaticResource PhoneFontFamilySemiLight}" />
        <Setter Property="FontSize"
            Value="{StaticResource PhoneFontSizeExtraLarge}" />
    </Style>

    <system:String x:Key="ApplicationTitle">TFS On The Road</system:String>    

    <Style x:Key="HyperlinkButtonNotUnderlineStyle" TargetType="HyperlinkButton">
        <Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="HyperlinkButton">
                    <Border Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="TextElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="TextElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="{TemplateBinding Background}" Margin="{StaticResource PhoneHorizontalMargin}" Padding="{TemplateBinding Padding}">
                            <TextBlock x:Name="TextElement" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Text="{TemplateBinding Content}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>

    <converters:FieldHasValueVisibilityConverter x:Key="FieldHasValueVisibilityConverter"/>

</ResourceDictionary>